home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / bcsrce2.zip / MRUN.BC < prev    next >
Text File  |  1990-10-15  |  3KB  |  107 lines

  1. let %!a = %1
  2. if %!a# = # Let %!d = 1
  3. if %!a# = # goto SYNTAX
  4. let %!z = %!a
  5. string_length %!z
  6. lt %!z 2
  7. if errorlevel 1 goto input1
  8. goto TEST1
  9. :INPUT1
  10. cls
  11. gosub BASICS
  12. locate 8 4
  13. echonolf  █  Program  █
  14. locate 9 4
  15. echonolf  █  Name is  █
  16. locate 10 4
  17. echonolf  █  Missing  █
  18. locate 15 1
  19. echonolf Input Name of program (Ex:  TYPE ):\\32
  20. read %!a
  21. let %!z = %!a
  22. let %!y = %!a
  23. if %!y = / GOTO SYNTAX2
  24. string_length %!z
  25. lt %!z 2
  26. if errorlevel 1 goto input1
  27. goto TEST1
  28. :TEST1
  29. let %!b = %2
  30. if %!b# = # goto INPUT2
  31. goto TEST2
  32. :INPUT2
  33. cls
  34. locate 1 1
  35. gosub BASICS
  36. locate 8 4
  37. echonolf  █  Target   █
  38. locate 9 4
  39. echonolf  █  Filespec █
  40. locate 10 4
  41. echonolf  █  Missing  █
  42. locate 15 1
  43. echonolf Input Source filespec (Ex:  ABC*.DOC):\\32
  44. read %!b
  45. let %!z = %!b
  46. string_length %!z
  47. lt %!z 3
  48. if errorlevel 1 goto input2
  49. goto TEST2
  50. :TEST2
  51. let %!z = %!b
  52. IF NOT EXIST %!z goto ERROR
  53. goto ACT
  54. :BASICS
  55. echonolf ╔══════════════════════════════════════════════════════════════════════════════╗
  56. echonolf ║                                  DOS BASICS                                  ║
  57. echonolf ║                                                                              ║
  58. echonolf ║ Suggested Filenaming:  A-Z, underscore, 0-9, begin with letter avoid dash(-) ║
  59. echonolf ║ Wildcards:  Filenams.Ext = File????.Ex? = Fil*.E?t = F*.* = ????N*.??t = *.* ║
  60. echonolf ║ Directory Anatomy:  C:\DIR\SUBDIR\SUBDIR2\Filespec.Ext                       ║
  61. echonolf ║ ╔════════════════╗  │  │   ├──────┘       └─Name of file(s) and Extension    ║
  62. echonolf ║ ║                ║  │  │   └─Subdirectories with required "\" divider        ║
  63. echonolf ║ ║                ║  │  └─1st Level directory preceded with required ":\"     ║
  64. echonolf ║ ║                ║  └─Drive identifier A-E unless Network loaded then A-Z    ║
  65. echonolf ╚═╩════════════════╩═══════════════════════════════════════════════════════════╝
  66. return
  67. goto END
  68. :ACT
  69. let %!y = %!b
  70. for %j in (%!y) do gosub ACTON %j
  71. goto END
  72. :ACTON
  73. gosub_parameter %!g
  74. !%!a %!g
  75. return
  76. :SYNTAX
  77. cls
  78. echo       SYNTAX---:  MRUN [Program] [Filespec·to·process]
  79. echo       USAGE----:  On any filespec entered, the inputted program is ran.
  80. echo                   If any of the two parameters are missing they are prompted
  81. echo                   for and tested. Program name must be 2 characters or more.
  82. echo.                  Existance of Filespec is verified. If prompted for Program
  83. echo.                  name, enter a '/' or Ctrl-C to abort this utility.
  84. echo.
  85. echo       EXAMPLE--:  MRUN TYPE *.TXT
  86. echo.
  87. echo.
  88. IF %!a = / GOTO END
  89. IF %!d = 1 GOSUB PROG
  90. IF %!d = 1 GOTO INPUT1
  91. goto END
  92. :SYNTAX2
  93. echo.
  94. echo       SYNTAX---:  MRUN [Program] [Filespec·to·process]
  95. goto END
  96. :PROG
  97. ECHO            Wait 4 seconds then input [Program] name.
  98. WAIT 4
  99. RETURN
  100. :ERROR
  101. echo  Unable to verify existance of Source Filespec %!a
  102. echo  Or, something wrong with program's name.
  103. waitkey 3
  104. goto SYNTAX
  105. :END
  106.  
  107.